<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.example.studentgrades.model.Admin" %>
<%
    Admin admin = (Admin) session.getAttribute("admin");
    if (admin == null) {
        response.sendRedirect("admin_login.jsp");
        return;
    }
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>新增学生</title>
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
    <h2 class="text-center">新增学生</h2>
    <form action="<%= request.getContextPath() %>/admin/add_student" method="post" class="mt-4">
        <div class="form-group">
            <label for="username">用户名:</label>
            <input type="text" class="form-control" id="username" name="username" required>
        </div>
        <div class="form-group">
            <label for="password">密码:</label>
            <input type="password" class="form-control" id="password" name="password" required>
        </div>
        <button type="submit" class="btn btn-primary btn-block">添加</button>
    </form>
    <a href="manage_students.jsp" class="btn btn-secondary btn-block mt-3">返回</a>
</div>
</body>
</html>
